@using OrchardCore.Commerce.ProductAttributeValues
@{
    int index = Model.Index;
    var attr = Model.AttributeValue as TextProductAttributeValue;
    var name = $"{Model.NamePrefix ?? "line"}.Attributes[{index}]";
    var form = string.IsNullOrEmpty(Model.Form) ? "" : $" form=\"{Model.Form}\"";
    if (attr.Value != null)
    {
        <input type="hidden"@Html.Raw(form) name="@(name).Key" value="@attr.AttributeName" />
        @foreach (string val in attr.Value)
{
            <input type="hidden"@Html.Raw(form) name="@(name).Value" value="@val" />
        }
    }
}